<include file="public@header"/>

</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="javascript:;">所有留言</a></li>
    </ul>
    <form class="js-ajax-form" action="" method="post">
        <table class="table table-hover table-bordered table-list">
            <thead>
            <tr>
                <th width="50">ID</th>
                <th>姓名</th>
                <th>手机</th>
                <th>邮箱</th>
                <th>状态</th>
                <th>时间</th>
                <th>操作</th>

            </tr>
            </thead>
            <foreach name="messages" item="vo">
                <tr>
                    <td><b>{$vo.id}</b></td>
                    <td>
                        {$vo.truename}
                    </td>
                    <td>
                        {$vo.mobile}
                    </td>
                    <td>{$vo.email}</td>
                    <td>
                        <switch name="$vo['status']">
                            <case value="0">未读</case>
                            <case value="1">已读</case>
                            <case value="2">已处理</case>

                        </switch>
                    </td>
                    <td>
                        {$vo.updated_at}
                    </td>
                    <td>
                        <a href="/portal/admin_message/detail?id={$vo.id}">查看</a>
                        <if condition="$vo['status'] == 0||$vo['status'] == 1">
                            |
                            <a href="/portal/admin_message/mark?id={$vo.id}" class="js-ajax-delete" data-msg="确定标记为已处理？">标记</a>

                        </if>
                    </td>
                </tr>
            </foreach>
            <tfoot>
            <tr>
                <th width="50">ID</th>
                <th>姓名</th>
                <th>手机</th>
                <th>邮箱</th>
                <th>状态</th>
                <th>时间</th>
                <th>操作</th>

            </tr>
            </tfoot>
        </table>
        <ul class="pagination">{$page|default=''}</ul>
    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
<script>

    function reloadPage(win) {
        win.location.reload();
    }

    $(function () {
        setCookie("refersh_time", 0);
        Wind.use('artDialog','iframeTools', function () {
            //批量复制
            $(document).on('click','.seeMessage',function (e) {
                e.preventDefault();
                var context = $(this).attr('data-message');
                art.dialog.through({
                    id: 'success',
                    content: context,
                    cancelVal: '关闭',
                    cancel: true
                });
            })

        });
    });
</script>
</body>
</html>